import { Injectable } from '@nestjs/common';

import { ConfigCenterServerSide } from '@libs/common/config-center';

@Injectable()
export class ServerSideConfigService {
    private readonly configCenter: ConfigCenterServerSide;

    constructor() {
        // dependency on RUN_ENV & ROOT_PATH
        this.configCenter = new ConfigCenterServerSide();
    }

    public get(configName: string): any {
        return this.configCenter.getConfig(configName);
    }
}
